import request from '@/utils/request';
import type { Doc, DocParams, KnowledgePage, KnowledgeParams } from '@/type/HomeTyoe';
import type { Page, ResponseType } from '@/type/ResponseType';

enum Enum {
  fetchKnowledgeListAPI = '/patient/home/knowledge',
  fetchDocListAPI = '/home/page/doc'
}

/**
 * @description 获取首页文章列表的接口
 * */
export const fetchKnowledgeListAPI = (params: KnowledgeParams) => request.get<KnowledgePage, ResponseType<KnowledgePage>>(Enum.fetchKnowledgeListAPI, { params });

/**
 * @description 获取关注的医生列表
 * */
export const fetchDocListAPI = (params:DocParams) => request.get<Page<Doc[]>, ResponseType<Page<Doc[]>>>(Enum.fetchDocListAPI,{params});